libacpi: report PCI slots as enabled only for hotpluggable devices
authorIgor Druzhinin <igor.druzhinin@citrix.com>
Thu, 6 Jun 2019 12:11:24 +0000 (14:11 +0200)
committerJan Beulich <jbeulich@suse.com>
Thu, 6 Jun 2019 12:11:24 +0000 (14:11 +0200)
commitf9233b7804ec422d052c2a9d9cc9ef435c742f61
tree42b286dc73cf178f13e296858cc25b2c57c548a0
parent2effc2f131145fdd40352085c11adb1e17164135
libacpi: report PCI slots as enabled only for hotpluggable devices

DSDT for qemu-xen lacks _STA method of PCI slot object. If _STA method
doesn't exist then the slot is assumed to be always present and active
which in conjunction with _EJ0 method makes every device ejectable for
an OS even if it's not the case.

qemu-kvm is able to dynamically add _EJ0 method only to those slots
that either have hotpluggable devices or free for PCI passthrough.
As Xen lacks this capability we cannot use their way.

qemu-xen-traditional DSDT has _STA method which only reports that
the slot is present if there is a PCI devices hotplugged there.
This is done through querying of its PCI hotplug controller.
qemu-xen has similar capability that reports if device is "hotpluggable
or absent" which we can use to achieve the same result.

Signed-off-by: Igor Druzhinin <igor.druzhinin@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
master commit: 6761965243b113230bed900d6105be05b28f5cea
master date: 2019-05-24 10:30:21 +0200
tools/libacpi/mk_dsdt.c